package com.ydd;

import android.app.Application;

import com.umeng.analytics.MobclickAgent;
import com.ydd.share.ShareManager;

import cn.jpush.android.api.JPushInterface;

/**
 * @author tao
 */

public class MyApplication extends Application {
    private static MyApplication myApplication;

    @Override
    public void onCreate() {
        super.onCreate();
        myApplication = this;
        initShareSDK();
        initJPush();
        initUMeng();
    }

    public static MyApplication getInstance() {
        return myApplication;
    }


    public void initShareSDK() {
        ShareManager.getInstance().init(this);
    }

    public void initJPush() {
        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);
    }

    public void initUMeng() {
        MobclickAgent.setDebugMode(true);
        MobclickAgent.openActivityDurationTrack(false);
    }

}
